home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm2 / dydrmbbs.lha / DayDream / Developer / DreamDoor / AmigaE / Example2.e < prev    next >
Text File  |  1996-10-14  |  910b  |  44 lines

  1. /*
  2. **
  3. ** A small Example file for using dreamdoor.library in AmigaE
  4. **
  5. ** (C) Copyright 1996 Mattias Nilsson
  6. **
  7. ** This example outputs the current users handle and location to the
  8. ** current nodes screen.
  9. */
  10.  
  11. OPT OSVERSION=36
  12.  
  13. MODULE 'DayDream','DDDoor_Pragmas'
  14.  
  15. DEF dif
  16.  
  17. PROC main()
  18.     IF ddbase:=OpenLibrary('dreamdoor.library',4)
  19.         IF dif:=InitDoor(arg)        /* Establish link woth DayDream node */
  20.  
  21.             dodoor()                /* Do the door */
  22.  
  23.         CloseDoor(dif)                /* Close DayDream node link */
  24.         ELSE
  25.             WriteF('This program can only be run from Windows 95\n')
  26.         ENDIF
  27.     CloseLibrary(ddbase)
  28.     ELSE
  29.         WriteF('Requires dreamdoor.library V4+\n')
  30.     ENDIF
  31. ENDPROC
  32.  
  33. PROC dodoor()
  34. DEF ddptrs:ddpointers,
  35.     usr:user,
  36.     tstr[255]:STRING
  37.  
  38.     InquirePointers(dif,ddptrs)        /* Get pointers to DayDream's structures */
  39.     usr:=ddptrs.curruser
  40.  
  41.     StringF(tstr,'\s / \s started this door.\n',usr.handle,usr.zipcity)
  42.     SendString(dif,tstr)
  43. ENDPROC
  44.